<?

include_once "accesscontrol.php";

$SK_d = strip_tags($SK_d, "<br>");
$SK_d = addslashes($SK_d);
$expert = strip_tags($expert, "<br>");
$expert = addslashes($expert);
$dateEdit = date("Y/m/d : H:i:s");

if ( $submit == 'Save and finish')
{
$q4 = "SELECT * FROM job_skills where  uname = \"$_SESSION[uname]\" ";
$r4 = mysql_query($q4) or die(mysql_error());
$a4 = mysql_fetch_array($r4);
if(!empty($a4)){

$q1 = "update job_skills set SK_d = \"$SK_d\", expertise = \"$expert\" where  uname = \"$_SESSION[uname]\" ";
$r2 = mysql_query($q1) or die(mysql_error());
}else{
$q5 = "INSERT INTO job_skills set uname = \"$_SESSION[uname]\", SK_d = \"$SK_d\", expertise = \"$expert\"";
$r5 = mysql_query($q5) or die(mysql_error());
}
$q3 = "update job_seeker_info set modifiedTime = \"$dateEdit\" where  uname = \"$_SESSION[uname]\" ";
$r3 = mysql_query($q3) or die(mysql_error());

$q12 = "select * from job_skills where uname = \"$_SESSION[uname]\" ";
$r12 = mysql_query($q12) or die(mysql_error());
$a12 = mysql_fetch_array($r12);

$a111 = stripslashes($a12[SK_d]);

echo "<br><br><br><center><span class=BlackLink>Your resume has been updated successfully!</span></center>";


unset($submit);
include_once('../footer.php');
}

else
{
include "EditSkills.php";
}
?>
